<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>错误监控</title>
</head>

<body>
    <img src="./sfsdsfs.png" alt="">
    <script>
        window.onerror = (msg, url, row, col, error) => {
            console.log({
                msg,
                url,
                row,
                col,
                error
            })
        }

        window.addEventListener('error', (e) => {
            console.log(e)
            console.log(e.target.currentSrc)
        }, true)

        // setTimeout(() => {
        //     undefined.map(val => {
        //         console.log(val)
        //     })
        // }, 0)
    </script>
</body>

</html>